﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using ERP_RORZE_DLL.Product.DAO;
using ERP_RORZE_DLL.Product.database;
using ERP_RORZE_PRODUCT.Product.DAO;

namespace ERP_RORZE_PRODUCT.Product.Incauhinh
{
    public partial class frm_ConfigureEdit : DevExpress.XtraEditors.XtraForm
    {
        public event EventHandler Reload;
        ClsIncauhinhDAO clsConfigureDAO = new ClsIncauhinhDAO();

        public string ID;
        public string Name;

        public frm_ConfigureEdit()
        {
            InitializeComponent();
        }

        private void btnExit_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void frm_ConfigureEdit_Load(object sender, EventArgs e)
        {
            txtConfigure.Text = Name;
        }

        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (txtConfigure.Text == "")
            {
                MessageBox.Show("Chưa nhập loại cấu hình");
            }
            else
            {
                clsConfigureDAO.UpdateConfigure(ID, txtConfigure.Text);
                MessageBox.Show("Đã nhập xong");
                Reload(sender, e);
            }
        }
    }
}